package com.bifrost.web.controller;

import com.bifrost.model.ResultModel;
import com.bifrost.model.vo.TransactionVO;
import com.bifrost.service.TransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author by yanxiaobo
 * Date on 2018/6/20$.
 */
@RestController
@RequestMapping("/transaction")
public class FindTransactionController {

    @Autowired
    TransactionService transactionService;

    @RequestMapping("/find")
    public List<TransactionVO> findTransaction() {
        return transactionService.find();
    }

    @GetMapping("/sapSync/find")
    public ResultModel findSync() {
        return transactionService.findSync();
    }
}

